package com.lagou.module2.task2;

public class PhoneCard {
    //构造方法
    public PhoneCard(String type, int num, String user, String password, double balance, int min, int data) {
        setBalance(balance);
        setCard_num(num);
        setCard_type(type);
        setData(data);
        setMinutes(min);
        setUser_name(user);
        setPassword(password);
    }
    public PhoneCard(){}
    //成员变量
    private String card_type;
    private int card_num;
    private String user_name;
    private String password;
    private double balance;
    private int minutes;
    private int data;

    //get和set方法

    public String getCard_type() {
        return card_type;
    }

    public void setCard_type(String card_type) {
        this.card_type = card_type;
    }

    public int getCard_num() {
        return card_num;
    }

    public void setCard_num(int card_num) {
        this.card_num = card_num;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public int getMinutes() {
        return minutes;
    }

    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    //成员方法
    public void showCard(){
        System.out.println("当前卡号为: "+card_num+"\n用户名为: "+user_name+"\n当前余额: "+balance+"元");
    }
}
